package com.apexsoft.margin.account.management.api.http;

import com.apexsoft.margin.account.management.domain.search.model.UserAcc;
import com.apexsoft.margin.account.management.domain.search.service.UserAccRepository;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;

@RestController
@RequestMapping("/hello")
@Slf4j
public class UserAccController {
    @Autowired
    UserAccRepository repository;
    @PostMapping("/getUser")
    public UserAcc test(@RequestBody UserAcc user){
        Integer id = user.getId();
        UserAcc userAcc = repository.queryById(id);
        return userAcc;
    }
}
